﻿using SharPy.GameSettings;
using SharPy.Parser;
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

// The Settings Flyout item template is documented at http://go.microsoft.com/fwlink/?LinkId=273769

namespace SharPy
{
    public sealed partial class SettingsPageFlyout : SettingsFlyout
    {
        public SettingsPageFlyout()
        {
            this.InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            clSettings.saveGameState(clText.gameState);
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            clText.gameState = clSettings.getGameState();
        }

        private void FontSize_TextChanged(object sender, TextChangedEventArgs e)
        {
            clSettings.SetSetting("FontSize", Convert.ToInt32((sender as TextBox).Text));
        }
    }
}
